import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router);

import Layout from './views/layout/Layout'
import Home from './views/home/Home'
import Article from './views/article/Article'
import Markdown from './views/markdown/Markdown'
import RichText from './views/richtext/RichText'

export default new Router({
    routes: [
        {
            path: '',
            component: Layout,
            redirect: 'home',
            children: [
                {
                    path: 'home',
                    component: Home
                },
                {
                    path: 'news/:id',
                    component: Article
                },
                {
                    path: 'rich',
                    component: RichText
                },
                {
                    path: 'markdown',
                    component: Markdown
                }
            ]
        }
    ]
})
